<?php
$toolbar    =new ToolBarHelper($act);
$toolbar->setSubmitAjax(true);

$tabsedit   = array("Base","Where","When","Highlights","Quick Facts","Practical hints","Visa","Travel tips","FAQs");

if($act=="add" )
{
    $toolbar->addTab($tabsedit);
    $toolbar->SetTitle('[New]');
    $toolbar->Back(getUrlBack());
    $toolbar->Save('Save',2);
    $toolbar->Save('Save & Exit');
}
else if($act=="edit")
{
    $toolbar->addTab($tabsedit);
    $toolbar->SetTitle('[Edit]');
    $toolbar->Back(getUrlBack());
    $toolbar->Apply();
    $toolbar->Save();
}
else if($act=="editcat")
{
    $toolbar->SetTitle('[Edit]');
    $toolbar->Back(getUrlBack());
    $toolbar->Apply();
    $toolbar->Save();
}

else if($act=="addvideo" )
{
    $toolbar->SetTitle('[New Video]');
    $toolbar->Back("?module=$module&opt=video&id=".$video['iParentId']);
    $toolbar->Save('Save',2);
    $toolbar->Save('Save & Exit');
}
else if($act=="editvideo")
{
    $toolbar->SetTitle('[Edit Video]');
    $toolbar->Back("?module=$module&opt=video&id=".$video['iParentId']);
    $toolbar->Apply();
    $toolbar->Save();
}
else if($act=="video")
{
     $toolbar->SetTitle('[Videos]');
    $toolbar->Back(getUrlBack());
    $toolbar->Delete('delvideo');
    $toolbar->Apply();
    $toolbar->addNew('addvideo','New Video','id='.$id);
}
else if($act=="photos")
{
     $toolbar->SetTitle('[Add Photos]');
    $toolbar->Back(getUrlBack());
    $toolbar->Apply();
    $toolbar->Save();
}
else
{
    $toolbar->setSubmitAjax(false);
    $toolbar->Delete();
    $toolbar->Apply();
    if($id>0 && $type=="loc")
    {
        $toolbar->Edit('edit','Edit','id='.$id);
    }
    else if($id>0)
    {
        $toolbar->Edit('editcat','Edit','id='.$id);
    }
    $toolbar->addNew('add','New ','id='.$id);
}
?>